function TbOfflineZs(params){ 
	 
}

TbOfflineZs.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new TbOfflineZs.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new TbOfflineZs.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new TbOfflineZs.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	/** 编号 [非空]       **/
	this.tbozId=function(tbozId){if(this.proxy)return this.getProxy().tbozId(tbozId);  this.put("tbozId", tbozId);return this;};
	/** and tboz_id is null */
	this.tbozIdNull=function(){if(this.proxy)return this.getProxy().tbozIdNull();if(this.get("tbozIdNot")==null)this.put("tbozIdNot", "");this.put("tbozId", null);return this;};
	/** not .... */
	this.tbozIdNot=function(){if(this.proxy)return this.getProxy().tbozIdNot();this.put("tbozIdNot", "not");return this;};
	this.tbozIdNotNull=function(){if(this.proxy)return this.getProxy().tbozIdNotNull();this.put("tbozIdNot", "not");this.put("tbozId", null);return this;};
	this.tbozIdNot=function(tbozId){if(this.proxy)return this.getProxy().tbozIdNot(tbozId);this.put("tbozIdNot", "not");this.put("tbozId", tbozId);return this;};
	/** and tboz_id <= ? */
	this.tbozIdMin=function(min){if(this.proxy)return this.getProxy().tbozIdMin(min);this.put("tbozIdMin", min);return this;};
	/** and tboz_id >= ? */
	this.tbozIdMax=function(max){if(this.proxy)return this.getProxy().tbozIdMax(max);this.put("tbozIdMax", max);return this;};
	this.tbozIdIn=function(ids){
		if(this.proxy)return this.getProxy().tbozIdIn(ids);  this.put("tbozIdIn", ids);return this;
	};	
	
	/** 品牌  [Merchant]      **/
	this.tbozBrand=function(tbozBrand){if(this.proxy)return this.getProxy().tbozBrand(tbozBrand);  this.put("tbozBrand", tbozBrand);return this;};
	/** and tboz_brand is null */
	this.tbozBrandNull=function(){if(this.proxy)return this.getProxy().tbozBrandNull();if(this.get("tbozBrandNot")==null)this.put("tbozBrandNot", "");this.put("tbozBrand", null);return this;};
	/** not .... */
	this.tbozBrandNot=function(){if(this.proxy)return this.getProxy().tbozBrandNot();this.put("tbozBrandNot", "not");return this;};
	this.tbozBrandNotNull=function(){if(this.proxy)return this.getProxy().tbozBrandNotNull();this.put("tbozBrandNot", "not");this.put("tbozBrand", null);return this;};
	this.tbozBrandNot=function(tbozBrand){if(this.proxy)return this.getProxy().tbozBrandNot(tbozBrand);this.put("tbozBrandNot", "not");this.put("tbozBrand", tbozBrand);return this;};
	this.tbozBrandIn=function(ids){
		if(this.proxy)return this.getProxy().tbozBrandIn(ids);  this.put("tbozBrandIn", ids);return this;
	};	
	
	/** 内容        **/
	this.tbozContent=function(tbozContent){if(this.proxy)return this.getProxy().tbozContent(tbozContent);  this.put("tbozContent", tbozContent);return this;};
	/** and tboz_content is null */
	this.tbozContentNull=function(){if(this.proxy)return this.getProxy().tbozContentNull();if(this.get("tbozContentNot")==null)this.put("tbozContentNot", "");this.put("tbozContent", null);return this;};
	/** not .... */
	this.tbozContentNot=function(){if(this.proxy)return this.getProxy().tbozContentNot();this.put("tbozContentNot", "not");return this;};
	this.tbozContentNotNull=function(){if(this.proxy)return this.getProxy().tbozContentNotNull();this.put("tbozContentNot", "not");this.put("tbozContent", null);return this;};
	this.tbozContentNot=function(tbozContent){if(this.proxy)return this.getProxy().tbozContentNot(tbozContent);this.put("tbozContentNot", "not");this.put("tbozContent", tbozContent);return this;};
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有线下招商 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/business/offlinezs.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取线下招商分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/business/offlinezs.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取线下招商 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/business/offlinezs.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

TbOfflineZs.get = function(id){
	var protocol = ux.ajax("/admin/business/offlinezs.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.tbOfflineZs;
	return null;
}

TbOfflineZs.where = new TbOfflineZs.Where(0,true);